<template>
	<view>
		<div class="top">
			<div class="box1">
				本月连续签到24天
			</div>
			<div class="box2">
				<view class="img">
					<img src="../../static/psx/无奈表情.png" alt="">
				</view>
				<div class="text">
					漏签2天
				</div>
			</div>
			<div class="box3">
				获得积分
				<view class="text">
					120
				</view>
			</div>
		</div>
		<div class="con" v-for="item in data" :key="item.id" @click='go(item.id)'>
			<div class="box1">
				<div class="box1">
					{{item.title}}
				</div>
				<div class="box2">
					{{item.text}}
				</div>
			</div>
			<div class="box2">
				<div class="box1">
					{{item.fan}}
				</div>
				<div class="box2">
					{{Number(item.time) | formatdate}}
				</div>
			</div>
			<div class="box3">
				{{item.detil}}
			</div>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: []
			};
		},
		onLoad() {
			this.$api.getpsxpsxdetil().then(res => {
				console.log(res);
				this.data = res.data
			})

		},
		methods: {
			go(id){
				uni.navigateTo({
					url:`/pages/person/detaileds?id=${id}`
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.top {
		width: 100%;
		height: 223rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-evenly;
		align-items: center;
		border: 1rpx solid #cbcbcb;
		;

		.box1 {
			width: 280rpx;
			height: 34rpx;
			font-family: YouYuan;
			font-size: 34rpx;
			font-weight: normal;
			font-stretch: normal;
			letter-spacing: 0rpx;
			color: #8fc31f;
		}

		.box2 {
			display: flex;

			.img {
				width: 40rpx;
				height: 40rpx;
				margin-right: 30rpx;

				img {
					width: 100%;
					height: 100%;
				}
			}

			.text {
				width: 130rpx;
				height: 32rpx;
				font-family: YouYuan;
				font-size: 34rpx;
				font-weight: normal;
				font-stretch: normal;
				letter-spacing: 0rpx;
				color: #323232;
			}
		}

		.box3 {
			width: 171rpx;
			height: 31rpx;
			font-family: YouYuan;
			font-size: 28rpx;
			font-weight: normal;
			font-stretch: normal;
			letter-spacing: 0rpx;
			color: #323232;
			display: flex;
			align-items: center;
			justify-content: center;


			.text {
				font-family: MicrosoftYaHei;
				font-size: 34rpx;
				font-weight: normal;
				letter-spacing: 0rpx;
				color: #8fc31f;
			}
		}
	}

	.con {
		width: 100%;
		height: 140rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		border: 1rpx solid #cbcbcb;
		padding-bottom: 30rpx;

		.box1 {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			.box1 {
				// width: 138rpx;
				height: 80rpx;
				font-family: YouYuan;
				font-size: 34rpx;
				font-weight: bold;
				font-stretch: normal;
				letter-spacing: 0rpx;
				color: #323232;
			}

			.box2 {
				// width: 142rpx;
				// height: 23rpx;
				font-family: YouYuan;
				font-size: 24rpx;
				font-weight: normal;
				font-stretch: normal;
				letter-spacing: 0rpx;
				color: #646464;
			}
		}

		.box2 {
			.box1 {
				// width: 74rpx;
				height: 80rpx;
				font-family: YouYuan;
				font-size: 24rpx;
				font-weight: bold;
				font-stretch: normal;
				letter-spacing: 0rpx;
				color: #8fc31f;
			}

			.box2 {
				// width: 119rpx;
				// height: 19rpx;
				font-family: MicrosoftYaHeiLight;
				font-size: 24rpx;
				font-weight: normal;
				font-stretch: normal;
				letter-spacing: 0rpx;
				color: #646464;
			}
		}

		.box3 {
			width: 64rpx;
			height: 29rpx;
			font-family: MicrosoftYaHeiLight;
			font-size: 38rpx;
			font-weight: normal;
			font-stretch: normal;
			letter-spacing: 0rpx;
			color: #8fc31f;
		}
	}
</style>
